
import delimited "C:\Users\simda81\OneDrive - Linköpings universitet\Other\Effects of parliamentarianism\Onpartyorg\statadatapost.csv", encoding(ISO-8859-2) clear 


ds , has(type string)
foreach var of varlist `r(varlist)' {
    quietly replace `var' = "." if `var' == "NA" 
}

replace e_s = "" if e_s == "."



replace pr = "" if pr == "."


destring, replace

encode country, generate(countryname)

xtset countryname year

encode pr, generate(prop)

generate enpplag1 = L1.enpptotal_ols
generate prulelag1 = L1.prule
generate suffragelag1 = L1.suffrage
generate prlag1 = L1.prop
generate loggdppclag1 = L1.loggdppc
generate socialismlag1 = L1.ssstotal_ols
generate partyinstlag1 = L1.partyinst
generate cslag1 = L1.cs
generate yearlag1 = L1.year

label variable enpptotal_ols "Fragmentation"
label variable ssstotal_ols "Socialist seat share"
label variable partyinst "Party strength"
label variable prule "Parliamentarism"
label variable suffrage "Suffrage"
label variable prop "PR"
label variable cs "Civil society strength"


label variable enpplag1 "Fragmentation (t-1)"
label variable prulelag1 "Parliamentarism (t-1)"
label variable suffragelag1 "Suffrage (t-1)"
label variable prlag1 "Proportional Representation (t-1)"
label variable loggdppclag1 "Log GDP/cap (t-1)"
label variable socialismlag1 "Socialist seat share (t-1)"
label variable partyinstlag1 "Party strength (t-1)"
label variable cslag1 "Civil society strength (t-1)"
label variable yearlag1 "Year"

label define prlag1 1 "Not PR (t-1)" 2 "PR (t-1)" 
label values prlag1 prlag1

generate enpplag2 = L2.enpptotal_ols
generate prulelag2 = L2.prule
generate suffragelag2 = L2.suffrage
generate prlag2 = L2.prop
generate loggdppclag2 = L2.loggdppc
generate socialismlag2 = L2.ssstotal_ols
generate partyinstlag2 = L2.partyinst
generate cslag2 = L2.cs
generate yearlag2 = L2.year

label variable enpplag2 "Fragmentation (t-2)"
label variable prulelag2 "Parliamentarism (t-2)"
label variable suffragelag2 "Suffrage (t-2)"
label variable prlag2 "Proportional Representation (t-2)"
label variable loggdppclag2 "Log GDP/cap (t-2)"
label variable socialismlag2 "Socialist seat share (t-2)"
label variable partyinstlag2 "Party strength (t-2)"
label variable cslag2 "Civil society strength (t-2)"
label variable yearlag2 "Year"

label define prlag2 1 "Not PR (t-2)" 2 "PR (t-2)" 
label values prlag2 prlag2

generate enpplag3 = L3.enpptotal_ols
generate prulelag3 = L3.prule
generate suffragelag3 = L3.suffrage
generate prlag3 = L3.prop
generate loggdppclag3 = L3.loggdppc
generate socialismlag3 = L3.ssstotal_ols
generate partyinstlag3 = L3.partyinst
generate cslag3 = L3.cs
generate yearlag3 = L3.year

label variable enpplag3 "Fragmentation (t-3)"
label variable prulelag3 "Parliamentarism (t-3)"
label variable suffragelag3 "Suffrage (t-3)"
label variable prlag3 "Proportional Representation (t-3)"
label variable loggdppclag3 "Log GDP/cap (t-3)"
label variable socialismlag3 "Socialist seat share (t-3)"
label variable partyinstlag3 "Party strength (t-3)"
label variable cslag3 "Civil society strength (t-3)"
label variable yearlag3 "Year"

label define prlag3 1 "Not PR (t-3)" 2 "PR (t-3)" 
label values prlag3 prlag3


generate enpplag4 = L4.enpptotal_ols
generate prulelag4 = L4.prule
generate suffragelag4 = L4.suffrage
generate prlag4 = L4.prop
generate loggdppclag4 = L4.loggdppc
generate socialismlag4 = L4.ssstotal_ols
generate partyinstlag4 = L4.partyinst
generate cslag4 = L4.cs
generate yearlag4 = L4.year


label variable enpplag4 "Fragmentation (t-4)"
label variable prulelag4 "Parliamentarism (t-4)"
label variable suffragelag4 "Suffrage (t-4)"
label variable prlag4 "Proportional Representation (t-4)"
label variable loggdppclag4 "Log GDP/cap (t-4)"
label variable socialismlag4 "Socialist seat share (t-4)"
label variable partyinstlag4 "Party strength (t-4)"
label variable cslag4 "Civil society strength (t-4)"
label variable yearlag4 "Year"

label define prlag4 1 "Not PR (t-4)" 2 "PR (t-4)" 
label values prlag4 prlag4

generate enpplag5 = L5.enpptotal_ols
generate prulelag5 = L5.prule
generate suffragelag5 = L5.suffrage
generate prlag5 = L5.prop
generate loggdppclag5 = L5.loggdppc
generate socialismlag5 = L5.ssstotal_ols
generate partyinstlag5 = L5.partyinst
generate cslag5 = L5.cs
generate yearlag5 = L5.year

label variable enpplag5 "Fragmentation (t-5)"
label variable prulelag5 "Parliamentarism (t-5)"
label variable suffragelag5 "Suffrage (t-5)"
label variable prlag5 "Proportional Representation (t-5)"
label variable loggdppclag5 "Log GDP/cap (t-5)"
label variable socialismlag5 "Socialist seat share (t-5)"
label variable partyinstlag5 "Party strength (t-5)"
label variable cslag5 "Civil society strength (t-5)"
label variable yearlag5 "Year"

label define prlag5 1 "Not PR (t-5)" 2 "PR (t-5)" 
label values prlag5 prlag5

generate freedomslag1 = L1.freedoms

generate freedomcats=recode(freedoms,.67,1)
egen freedomscats= group(freedomcats)

generate freedomscatslag1 = L1.freedomscats
label variable freedomscatslag1 "Freedoms (t-1)"
label define freedomscatslag1 1 "Low-Medium" 3 "High"


keep if year > 1869 & year < 1940

cd "C:\Users\simda81\OneDrive - Linköpings universitet\Other\Effects of parliamentarianism\Onpartyorg"

//Descriptive statistics
bysort country: asdoc tabstat partyinst prule suffrage cs ssstotal_ols enpptotal_ols, stat(N mean sd min max range) label replace

pwcorr freedoms cs, sig //+0.502, p<0.000

/////////////////////////
///Simple relationship///
/////////////////////////

//Outreg main table/Table 2 using word
xtpcse c.partyinst c.prulelag1 i.yearlag1 i.countryname if year>1869 & year <1940, hetonly
outreg2 using myreg.doc, replace keep(prulelag1) ctitle(Model 1) label dec(3) nonotes addnote(*p<.01 **p<.05 ***p<.001, Country and year fixed effects regressions., Heteroskedasticity robust standard errors in parentheses., Model 7 excludes Britain.) title(Models testing causes of party strength 1870-1939)

xtpcse c.partyinst c.suffragelag1 i.yearlag1 i.countryname if year>1869 & year <1940, hetonly
outreg2 using myreg.doc, append keep(suffragelag1) ctitle(Model 2) label dec(3)

xtpcse c.partyinst c.cslag1 i.yearlag1 i.countryname if year>1869 & year <1940, hetonly
outreg2 using myreg.doc, append keep(cslag1) ctitle(Model 3) label dec(3)

xtpcse c.partyinst i.prlag1 i.yearlag1 i.countryname if year>1869 & year <1940, hetonly
outreg2 using myreg.doc, append keep(i.prlag1) ctitle(Model 4) label dec(3)

xtpcse c.partyinst c.prulelag1 c.suffragelag1 cslag1 i.prlag1 c.partyinstlag1 c.socialismlag1 c.enpplag1 i.yearlag1 i.countryname if year>1869 & year<1940, hetonly
outreg2 using myreg.doc, append keep(prulelag1 suffragelag1 cslag1 i.prlag1 partyinstlag1 socialismlag1 enpplag1) ctitle(Model 5) label dec(3)

xtpcse c.partyinst c.prulelag1 c.suffragelag1 i.prlag1 c.freedomslag1 c.partyinstlag1 c.socialismlag1 c.enpplag1 i.yearlag1 i.countryname, hetonly
outreg2 using myreg.doc, append keep(prulelag1 suffragelag1 freedomslag1 i.prlag1 partyinstlag1 socialismlag1 enpplag1) ctitle(Model 6) label dec(3)

xtpcse c.partyinst c.prulelag1 c.suffragelag1 cslag1 i.prlag1 c.partyinstlag1 c.socialismlag1 c.enpplag1   i.yearlag1 i.countryname if country !="Britain" & year<1940, hetonly
outreg2 using myreg.doc, append keep(prulelag1 suffragelag1 i.prlag1 cslag1 partyinstlag1 socialismlag1 enpplag1) ctitle(Model 7) label dec(3)
 
 //Using log gdp/capita, nothing changes (as mentioned in the text)
 xtpcse c.partyinst c.prulelag1 c.suffragelag1 cslag1 i.prlag1 c.partyinstlag1 c.socialismlag1 c.enpplag1 c.loggdppclag1 i.yearlag1 i.countryname if year>1869 & year<1940, hetonly
 
 //what happens with cs without socialism? This is mentioned in the text (use the same time period as above; cs still insignificant, parliamentarism and suffrage significant)
xtpcse c.partyinst c.prulelag1 c.suffragelag1 i.prlag1 cslag1 c.partyinstlag1 c.enpplag1   i.yearlag1 i.countryname  if e(sample) & year<1940, hetonly
//quietly estadd local period "1870-1939", replace

//what happens to PR without enpp? (As mentioned in the text, insignificant)
xtpcse c.partyinst c.prulelag1 c.suffragelag1 i.prlag1 cslag1 c.socialismlag1 c.partyinstlag1   i.yearlag1 i.countryname if year>1869 & year<1940, hetonly

//check with decade dummies as mentioned in the text
xtpcse c.partyinst c.prulelag1 c.suffragelag1 i.prlag1 cslag1 c.partyinstlag1 c.socialismlag1 c.enpplag1 i.decade i.countryname if year>1869 & year<1940, hetonly

//Check with civil-society freedoms as categorical as mentioned in the text
xtpcse c.partyinst c.prulelag1 c.suffragelag1 i.prlag1 i.freedomscatslag1 c.partyinstlag1 c.socialismlag1 c.enpplag1 i.yearlag1 i.countryname, hetonly

 
//porg
//pbranches
//pcohesion
//pplats
//plinks

generate porglag1 = L1.porg
generate pbrancheslag1 = L1.pbranches
generate pcohesionlag1 = L1.pcohesion
generate pplatslag1 = L1.pplats
generate plinkslag1 = L1.plinks

label variable porglag1 "Organization (t-1)"
label variable pbrancheslag1 "Local branches (t-1)"
label variable pcohesionlag1 "Legislative cohesion (t-1)"
label variable pplatslag1 "Distinct platforms (t-1)"
label variable plinkslag1 "Constituent linkages (t-1)"

//correlate the index with each component
pwcorr porg pbranches pcohesion pplats plinks partyinst, sig //0.81, 0.85, 0.72, 0.77, 0.42, respectively 

//Regressions withe one index component at a time
generate noporglag1b = L1.noporg
generate nopbrancheslag1b = L1.nopbranches
generate nopcohesionlag1b = L1.nopcohesion
generate nopplatslag1b = L1.nopplats
generate noplinkslag1b = L1.noplinks

label variable noporglag1b "Party strength - organization (t-1)"
label variable nopbrancheslag1b "Party strength -branches (t-1)"
label variable nopcohesionlag1b "Party strength -cohesion (t-1)"
label variable nopplatslag1b "Party strength -platforms (t-1)"
label variable noplinkslag1b "Party strength -links (t-1)"


//Table A4. outreg2, different lags
//Main model with different lags - socialism insignificant, prule, suffrage and enpp (negative) are constantly significant
xtpcse partyinst c.prulelag2 c.suffragelag2 i.prlag2 cslag2 partyinstlag2 socialismlag2 enpplag2 i.yearlag2 i.countryname if year<1940, hetonly
outreg2 using myreg7.doc, replace keep(prulelag2 suffragelag2 cslag2 i.prlag2 partyinstlag2 socialismlag2 enpplag2) ctitle(Two years) label dec(3) nonotes addnote(*p<.01 **p<.05 ***p<.001, Country and year fixed effects regressions., Heteroskedasticity robust standard errors in parentheses.) title(Models testing party strength at different year-lag lengths)

xtpcse partyinst c.prulelag3 c.suffragelag3 i.prlag3 cslag3 partyinstlag3 socialismlag3 enpplag3 i.yearlag3 i.countryname if year<1940, hetonly
outreg2 using myreg7.doc, append keep(prulelag3 suffragelag3 cslag3 i.prlag3 partyinstlag3 socialismlag3 enpplag3) ctitle(Three years) label dec(3)

xtpcse partyinst c.prulelag4 c.suffragelag4 i.prlag4 cslag4 partyinstlag4 socialismlag4 enpplag4 i.yearlag4 i.countryname if year<1940, hetonly
outreg2 using myreg7.doc, append keep(prulelag4 suffragelag4 cslag4 i.prlag4 partyinstlag4 socialismlag4 enpplag4) ctitle(Four years) label dec(3)

xtpcse partyinst c.prulelag5 c.suffragelag5 i.prlag5 cslag5 partyinstlag5 socialismlag5 enpplag5 i.yearlag5 i.countryname if year<1940, hetonly
outreg2 using myreg7.doc, append keep(prulelag5 suffragelag5 cslag5 i.prlag5 partyinstlag5 socialismlag5 enpplag5) ctitle(Five years) label dec(3)

//Table A6. outreg four-component model
xtpcse c.noporg c.prulelag1 c.suffragelag1 cslag1 i.prlag1 c.socialismlag1 c.enpplag1 i.yearlag1 c.noporglag1b i.countryname if year>1869 & year<1940, hetonly
outreg2 using myreg2.doc, replace keep(prulelag1 suffragelag1 cslag1 i.prlag1 socialismlag1 enpplag1 noporglag1b) ctitle(No permanent organization) label dec(3) nonotes addnote(*p<.01 **p<.05 ***p<.001, Country and year fixed effects regressions., Heteroskedasticity robust standard errors in parentheses.) title(Models using four party-strength components)

xtpcse c.nopbranches c.prulelag1 c.suffragelag1 cslag1 i.prlag1 c.nopbrancheslag1b c.socialismlag1 c.enpplag1 i.yearlag1 i.countryname if year>1869 & year<1940, hetonly
outreg2 using myreg2.doc, append keep(prulelag1 suffragelag1 cslag1 i.prlag1 nopbrancheslag1b socialismlag1 enpplag1) ctitle(No local branches) label dec(3)

xtpcse c.nopcohesion c.prulelag1 c.suffragelag1 cslag1 i.prlag1 c.nopcohesionlag1b c.socialismlag1 c.enpplag1 i.yearlag1 i.countryname if year>1869 & year<1940, hetonly
outreg2 using myreg2.doc, append keep(prulelag1 suffragelag1 cslag1 i.prlag1 nopcohesionlag1b socialismlag1 enpplag1) ctitle(No party cohesion) label dec(3)

xtpcse c.nopplats c.prulelag1 c.suffragelag1 cslag1 i.prlag1 c.nopplatslag1b c.socialismlag1 c.enpplag1 i.yearlag1 i.countryname if year>1869 & year<1940, hetonly
outreg2 using myreg2.doc, append keep(prulelag1 suffragelag1 cslag1 i.prlag1 nopplatslag1b socialismlag1 enpplag1) ctitle(No party platforms) label dec(3)

xtpcse c.noplinks c.prulelag1 c.suffragelag1 cslag1 i.prlag1 c.noplinkslag1b c.socialismlag1 c.enpplag1 i.yearlag1 i.countryname if year>1869 & year<1940, hetonly
outreg2 using myreg2.doc, append keep(prulelag1 suffragelag1 cslag1 i.prlag1 noplinkslag1b socialismlag1 enpplag1) ctitle(No constituent links) label dec(3)


//Table A7. Outreg four-component model with interaction. Add interaction term manually. 
xtpcse c.noporg prulelag1 c.suffragelag1 c.prulelag1#c.suffragelag1 cslag1 i.prlag1 c.socialismlag1 c.enpplag1 i.yearlag1 c.noporglag1b i.countryname if year>1869 & year<1940, hetonly
outreg2 using myreg3.doc, replace keep(prulelag1 suffragelag1 prulelag1#suffragelag1 cslag1 i.prlag1 socialismlag1 enpplag1 noporglag1b) ctitle(No permanent organization) label dec(3) nonotes addnote(*p<.01 **p<.05 ***p<.001, Country and year fixed effects regressions., Heteroskedasticity robust standard errors in parentheses.) title(Models using four party-strength components)

xtpcse c.nopbranches c.prulelag1 c.suffragelag1 c.prulelag1#c.suffragelag1 cslag1 i.prlag1 c.nopbrancheslag1b c.socialismlag1 c.enpplag1 i.yearlag1 i.countryname if year>1869 & year<1940, hetonly
outreg2 using myreg3.doc, append keep(prulelag1 suffragelag1 cslag1 i.prlag1 nopbrancheslag1b socialismlag1 enpplag1) ctitle(No local branches) label dec(3)

xtpcse c.nopcohesion c.prulelag1 c.suffragelag1 c.prulelag1#c.suffragelag1 cslag1 i.prlag1 c.nopcohesionlag1b c.socialismlag1 c.enpplag1 i.yearlag1 i.countryname if year>1869 & year<1940, hetonly
outreg2 using myreg3.doc, append keep(prulelag1 suffragelag1 cslag1 i.prlag1 nopcohesionlag1b socialismlag1 enpplag1) ctitle(No party cohesion) label dec(3)

xtpcse c.nopplats c.prulelag1 c.suffragelag1 c.prulelag1#c.suffragelag1 cslag1 i.prlag1 c.nopplatslag1b c.socialismlag1 c.enpplag1 i.yearlag1 i.countryname if year>1869 & year<1940, hetonly
outreg2 using myreg3.doc, append keep(prulelag1 suffragelag1 cslag1 i.prlag1 nopplatslag1b socialismlag1 enpplag1) ctitle(No party platforms) label dec(3)

xtpcse c.noplinks c.prulelag1 c.suffragelag1 c.prulelag1#c.suffragelag1 cslag1 i.prlag1 c.noplinkslag1b c.socialismlag1 c.enpplag1 i.yearlag1 i.countryname if year>1869 & year<1940, hetonly
outreg2 using myreg3.doc, append keep(prulelag1 suffragelag1 cslag1 i.prlag1 noplinkslag1b socialismlag1 enpplag1) ctitle(No constituent links) label dec(3)




////////////////////////////////
//Margins and long-run effects//
////////////////////////////////

//With hetonly

quietly xtpcse c.partyinst c.prulelag1 c.suffragelag1 i.prlag1 cslag1 c.socialismlag1 c.partyinstlag1 c.enpplag1   i.yearlag1 i.countryname i.countryname if year<1940, hetonly

   margins, at((mean) _all (min) c.prulelag1 prulelag1=(0.37 0.97)) post //Denmark
 

                                                
                                                test _b[1._at] = _b[2._at] //0,79 vs 0,81 (p = 0,067)

quietly xtpcse c.partyinst c.prulelag1 c.suffragelag1 i.prlag1 cslag1 c.socialismlag1 c.partyinstlag1 c.enpplag1   i.yearlag1 i.countryname i.countryname if year<1940, hetonly
												
 margins, at((mean) _all (min) c.suffragelag1 suffragelag1=(0.314 0.999)) post //Britain, 0,79 vs 0,81 
 

                                                
                                                test _b[1._at] = _b[2._at] //0.8 vs 0.81, p=.0.072
										
quietly xtpcse c.partyinst c.prulelag1 c.suffragelag1 i.prlag1 cslag1 c.socialismlag1 c.partyinstlag1 c.enpplag1   i.yearlag1 i.countryname i.countryname if year<1940, hetonly //Austria, 0,80 vs 0,81 (p=0.056)
												
  margins, at((mean) _all (min) c.socialismlag1 c.socialismlag1=(0.024 0.436)) post 

												test _b[1._at] = _b[2._at] //0.8 vs 0.81, p = 0.055
												
												

quietly xtpcse c.partyinst c.prulelag1 c.suffragelag1 i.prlag1 cslag1 c.socialismlag1 c.partyinstlag1 c.enpplag1   i.yearlag1 i.countryname if year<1940, hetonly

nlcom _b[c.prulelag1]/(1-_b[c.partyinstlag1]) //0.21 p=0.065

quietly xtpcse c.partyinst c.prulelag1 c.suffragelag1 i.prlag1 cslag1 c.socialismlag1 c.partyinstlag1 c.enpplag1   i.yearlag1 i.countryname if year<1940, hetonly

nlcom _b[c.socialismlag1]/(1-_b[c.partyinstlag1]) //0.18, p=0.071
	
quietly xtpcse c.partyinst c.prulelag1 c.suffragelag1 i.prlag1 cslag1 c.socialismlag1 c.partyinstlag1 c.enpplag1   i.yearlag1 i.countryname if year<1940, hetonly

nlcom _b[c.suffragelag1]/(1-_b[c.partyinstlag1]) //0.13, p = 0.042
													
//Margins for different lags

quietly xtpcse partyinst c.prulelag2 c.suffragelag2 i.prlag2 cslag2 partyinstlag2 socialismlag2 enpplag2 i.yearlag2 i.countryname if year<1940, hetonly
   margins, at((mean) _all (min) c.prulelag2 prulelag2=(0.37 0.97)) post //Denmark 0.79 vs 0.81
 

                                                
                                                test _b[1._at] = _b[2._at] //0.038
												
quietly xtpcse partyinst c.prulelag2 c.suffragelag2 i.prlag2 cslag2 partyinstlag2 socialismlag2 enpplag2 i.yearlag2 i.countryname if year<1940, hetonly
 margins, at((mean) _all (min) c.suffragelag2 suffragelag2=(0.314 0.999)) post //0.8 vs 0.81
 

                                                
                                                test _b[1._at] = _b[2._at] //0.043
										
												

quietly xtpcse partyinst c.prulelag3 c.suffragelag3 i.prlag3 cslag3 partyinstlag3 socialismlag3 enpplag3 i.yearlag3 i.countryname if year<1940, hetonly
 margins, at((mean) _all (min) c.prulelag3 prulelag3=(0.37 0.97)) post //Denmark 0.78 vs 0.82
 

                                                
                                                test _b[1._at] = _b[2._at] //0.002

quietly xtpcse partyinst c.prulelag3 c.suffragelag3 i.prlag3 cslag3 partyinstlag3 socialismlag3 enpplag3 i.yearlag3 i.countryname if year<1940, hetonly
 margins, at((mean) _all (min) c.suffragelag3 suffragelag3=(0.314 0.999)) post //0.79 vs 0.82
 

                                                
                                                test _b[1._at] = _b[2._at] //0.005

quietly xtpcse partyinst c.prulelag4 c.suffragelag4 i.prlag4 cslag4 partyinstlag4 socialismlag4 enpplag4 i.yearlag4 i.countryname if year<1940, hetonly
 margins, at((mean) _all (min) c.prulelag4 prulelag4=(0.37 0.97)) post //Denmark 0.78 vs 0.83
 

                                                
                                                test _b[1._at] = _b[2._at] //0.000

quietly xtpcse partyinst c.prulelag4 c.suffragelag4 i.prlag4 cslag4 partyinstlag4 socialismlag4 enpplag4 i.yearlag4 i.countryname if year<1940, hetonly
 margins, at((mean) _all (min) c.suffragelag4 suffragelag4=(0.314 0.999)) post //0.79 vs 0.82
 

                                                
                                                test _b[1._at] = _b[2._at] //<0.001

quietly xtpcse partyinst c.prulelag5 c.suffragelag5 i.prlag5 cslag5 partyinstlag5 socialismlag5 enpplag5 i.yearlag5 i.countryname if year<1940, hetonly
													
 margins, at((mean) _all (min) c.prulelag5 prulelag5=(0.37 0.97)) post //Denmark 0.78 vs 0.83
 

                                                
                                                test _b[1._at] = _b[2._at] //0.000
												
quietly xtpcse partyinst c.prulelag5 c.suffragelag5 i.prlag5 cslag5 partyinstlag5 socialismlag5 enpplag5 i.yearlag5 i.countryname if year<1940, hetonly
 margins, at((mean) _all (min) c.suffragelag5 suffragelag5=(0.314 0.999)) post //0.79 vs 0.82
 

                                                
                                                test _b[1._at] = _b[2._at] // <0.001
													
									
											
////////////////////
//With interaction//
////////////////////


///Interaction with hetonly


eststo clear

///Simple model

//Table 3 in the paper: Outreg for interaction model
xtpcse c.partyinst c.prulelag1##c.suffragelag1 cslag1  1.prlag1 c.partyinstlag1 c.socialismlag1 c.enpplag1   i.yearlag1 i.countryname if year	<1940, hetonly
outreg2 using myreg4.doc, replace keep(prulelag1 suffragelag1 cslag1 i.prlag1 partyinstlag1 socialismlag1 enpplag1) ctitle(Model 1) label dec(3) nonotes addnote(*p<.01 **p<.05 ***p<.001, Country and year fixed effects regressions., Heteroskedasticity robust standard errors in parentheses., Model 3 excludes Britain.) title(Models interacting parliamentarism and suffrage)

xtpcse c.partyinst c.prulelag1##c.suffragelag1 c.freedomslag1 i.prlag1 c.partyinstlag1 c.socialismlag1 c.enpplag1   i.yearlag1 i.countryname if year	<1940, hetonly
outreg2 using myreg4.doc, append keep(prulelag1 suffragelag1 freedomslag1 i.prlag1 partyinstlag1 socialismlag1 enpplag1) ctitle(Model 2) label dec(3)

xtpcse c.partyinst c.prulelag1##c.suffragelag1 cslag1 i.prlag1 c.partyinstlag1 c.socialismlag1 c.enpplag1   i.yearlag1 i.countryname if country !="Britain" & year<1940, hetonly
outreg2 using myreg4.doc, append keep(prulelag1 suffragelag1 cslag1 i.prlag1 partyinstlag1 socialismlag1 enpplag1) ctitle(Model 3) label dec(3)


//Figure 2 showing the interactive relationship
quietly xtpcse c.partyinst c.prulelag1##c.suffragelag1 i.prlag1 cslag1 c.partyinstlag1 c.socialismlag1 c.enpplag1   i.yearlag1 i.countryname if year	<1940, hetonly

margins, dydx(c.prulelag1) at(c.suffragelag1=(0.1 0.3 0.5 0.7 0.9))
margins, dydx(c.suffragelag1) at(c.prulelag1=(0.2 0.6 1.0)) 


margins, dydx(c.suffragelag1) at(c.prulelag1=(0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0)) 
quietly marginsplot, recast(line) plot1opts(lcolor(black)) recastci(rarea) ciopt(color(gray%50)) yline(0, lpattern(dash)) title("") ytitle("") xlab(, nogrid) ylab(, nogrid) xtitle("Parliamentarism")
graph export "marginofsuffrage.png", as(png) replace



//Table A5: Models testing different lags, interactive relationship added manually
xtpcse partyinst c.prulelag2##c.suffragelag2 i.prlag2 cslag2 partyinstlag2 socialismlag2 enpplag2 i.yearlag2 i.countryname if year<1940, hetonly
outreg2 using myreg8.doc, replace keep(prulelag2 suffragelag2 cslag2 i.prlag2 partyinstlag2 socialismlag2 enpplag2) ctitle(Two years) label dec(3) nonotes addnote(*p<.01 **p<.05 ***p<.001, Country and year fixed effects regressions., Heteroskedasticity robust standard errors in parentheses.) title(Models testing party strength at different year-lag lengths)

xtpcse partyinst c.prulelag3##c.suffragelag3 i.prlag3 cslag3 partyinstlag3 socialismlag3 enpplag3 i.yearlag3 i.countryname if year<1940, hetonly
outreg2 using myreg8.doc, append keep(prulelag3 suffragelag3 cslag3 i.prlag3 partyinstlag3 socialismlag3 enpplag3) ctitle(Three years) label dec(3)

xtpcse partyinst c.prulelag4##c.suffragelag4 i.prlag4 cslag4 partyinstlag4 socialismlag4 enpplag4 i.yearlag4 i.countryname if year<1940, hetonly
outreg2 using myreg8.doc, append keep(prulelag4 suffragelag4 cslag4 i.prlag4 partyinstlag4 socialismlag4 enpplag4) ctitle(Four years) label dec(3)

xtpcse partyinst c.prulelag5##c.suffragelag5 i.prlag5 cslag5 partyinstlag5 socialismlag5 enpplag5 i.yearlag5 i.countryname if year<1940, hetonly
outreg2 using myreg8.doc, append keep(prulelag5 suffragelag5 cslag5 i.prlag5 partyinstlag5 socialismlag5 enpplag5) ctitle(Five years) label dec(3)


//Table A2: Robustnesses for the uninteracted model with hetonly

//outreg2 uninteracted robustnesses
//pairwise
xtpcse c.partyinst c.prulelag1 c.suffragelag1 cslag1 i.prlag1 c.partyinstlag1 c.socialismlag1 c.enpplag1 i.yearlag1 i.countryname if year<1940, pairwise  hetonly
outreg2 using myreg5.doc, replace keep(prulelag1 suffragelag1 cslag1 i.prlag1 partyinstlag1 socialismlag1 enpplag1) ctitle(Pairwise) label dec(3) nonotes addnote(*p<.01 **p<.05 ***p<.001, Country and year fixed effects regressions., Standard errors in parentheses) title(Alternative estimators testing causes of party strength)

//AR(1) FE
xtregar c.partyinst c.prulelag1 c.suffragelag1 cslag1 i.prlag1 c.partyinstlag1 c.socialismlag1 c.enpplag1 i.countryname  i.yearlag1 if year<1940, fe
outreg2 using myreg5.doc, append keep(prulelag1 suffragelag1 cslag1 i.prlag1 partyinstlag1 socialismlag1 enpplag1) ctitle(AR(1) regression) label dec(3) 

//D&K
xtscc c.partyinst c.prulelag1 c.suffragelag1 cslag1 i.prlag1 c.partyinstlag1 c.socialismlag1 c.enpplag1 i.yearlag1 i.countryname if year<1940, fe 
outreg2 using myreg5.doc, append keep(prulelag1 suffragelag1 cslag1 i.prlag1 partyinstlag1 socialismlag1 enpplag1) ctitle(Driscoll & Kraay) label dec(3) 

//Common AR(1)
xtpcse c.partyinst c.prulelag1 c.suffragelag1 cslag1 i.prlag1 c.partyinstlag1 c.socialismlag1 c.enpplag1   i.yearlag1 i.countryname if year<1940, correlation(ar1) hetonly
outreg2 using myreg5.doc, append keep(prulelag1 suffragelag1 cslag1 i.prlag1 partyinstlag1 socialismlag1 enpplag1) ctitle(Prais Winsten common AR(1)) label dec(3) 

//Specific AR(1)
xtpcse c.partyinst c.prulelag1 c.suffragelag1 cslag1 i.prlag1 c.partyinstlag1 c.socialismlag1 c.enpplag1   i.yearlag1 i.countryname if year<1940, correlation(psar1) hetonly
outreg2 using myreg5.doc, append keep(prulelag1 suffragelag1 cslag1 i.prlag1 partyinstlag1 socialismlag1 enpplag1) ctitle(Prais Winsten specific AR(1)) label dec(3) 


///Table A3: Robustnesses for the interacted model with hetonly

//pairwise
xtpcse c.partyinst c.prulelag1##c.suffragelag1 cslag1 i.prlag1 c.partyinstlag1 c.socialismlag1 c.enpplag1 i.yearlag1 i.countryname if year<1940, pairwise  hetonly
outreg2 using myreg6.doc, replace keep(prulelag1 suffragelag1 cslag1 i.prlag1 partyinstlag1 socialismlag1 enpplag1) ctitle(Pairwise) label dec(3) nonotes addnote(*p<.01 **p<.05 ***p<.001, Country and year fixed effects regressions., Standard errors in parentheses) title(Alternative estimators testing causes of party strength)

//AR(1) FE
xtregar c.partyinst c.prulelag1##c.suffragelag1 cslag1 i.prlag1 c.partyinstlag1 c.socialismlag1 c.enpplag1 i.countryname  i.yearlag1 if year<1940, fe
outreg2 using myreg6.doc, append keep(prulelag1 suffragelag1 cslag1 i.prlag1 partyinstlag1 socialismlag1 enpplag1) ctitle(AR(1) regression) label dec(3) 

//D&K
xtscc c.partyinst c.prulelag1##c.suffragelag1 cslag1 i.prlag1 c.partyinstlag1 c.socialismlag1 c.enpplag1 i.yearlag1 i.countryname if year<1940, fe 
outreg2 using myreg6.doc, append keep(prulelag1 suffragelag1 cslag1 i.prlag1 partyinstlag1 socialismlag1 enpplag1) ctitle(Driscoll & Kraay) label dec(3) 

//Common AR(1)
xtpcse c.partyinst c.prulelag1##c.suffragelag1 cslag1 i.prlag1 c.partyinstlag1 c.socialismlag1 c.enpplag1   i.yearlag1 i.countryname if year<1940, correlation(ar1) hetonly
outreg2 using myreg6.doc, append keep(prulelag1 suffragelag1 cslag1 i.prlag1 partyinstlag1 socialismlag1 enpplag1) ctitle(Prais Winsten common AR(1)) label dec(3) 

//Specific AR(1)
xtpcse c.partyinst c.prulelag1##c.suffragelag1 cslag1 i.prlag1 c.partyinstlag1 c.socialismlag1 c.enpplag1   i.yearlag1 i.countryname if year<1940, correlation(psar1) hetonly
outreg2 using myreg6.doc, append keep(prulelag1 suffragelag1 cslag1 i.prlag1 partyinstlag1 socialismlag1 enpplag1) ctitle(Prais Winsten specific AR(1)) label dec(3) 













